<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%
        var _profile = Profile.GetProfile(ViewData["UserName"].ToString()); 
        
        %>
    <div class="ui-corner-top ui-widget-content" style="margin: 30px;">
        <div class="ui-widget-header ui-corner-top ui-border-bottom" style="padding: 10px">
            <h2>
                <%=string.IsNullOrEmpty(_profile.DisplayName) ? _profile.UserName : _profile.DisplayName%></h2>
        </div>
        <div style="padding: 20px;">
            <table style="width: 100%">
                <tr>
                    <td style="width: 250px;">
                        <table style="width: 100%">
                            <% if (!string.IsNullOrEmpty(_profile.Avatar))
                               { %>
                            <tr>
                                <td colspan="2" align="center">
                                    <img src="<%=Url.Content(_profile.Avatar) %>" alt="" class="ui-corner-all" />
                                </td>
                            </tr>
                            <%} %>
                            <tr>
                            <td> <%=Html.Global("RES_STATUS")%>:</td>
                            <td>
                            <% if (Membership.GetUser(_profile.UserName).IsOnline)
                               { %>
                            <span class="dna-ui-icon dna-ui-icon-online" style="float:left;"></span> <%=Html.Global("RES_ONLINE")%>
                            <%}
                               else
                               { %>
                               <span class="dna-ui-icon dna-ui-icon-offline" style="float:left;"></span> <%=Html.Global("RES_OFFLINE")%>
                               <%} %>
                            </td>
                            </tr>
                            <% if (!string.IsNullOrEmpty(_profile.Location))
                               { %>
                            <tr>
                                <td valign="top" style="width: 80px;">
                                    <%=Html.Global("RES_LOCATION")%>:
                                </td>
                                <td>
                                    <%=_profile.Location %>
                                </td>
                            </tr>
                            <%} %>
                            <tr>
                                <td valign="top">
                                    <%= Html.Global("RES_REGISTERED")%>:
                                </td>
                                <td>
                                    <%=Html.Global(Membership.GetUser(_profile.UserName).CreationDate) %>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">
                                    <%=Html.Global("RES_LAST_LOGIN")%>:
                                </td>
                                <td>
                                    <%=Html.Global(_profile.LastActivityDate) %>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top">
                        <table style="width: 100%">
                            <% if (!string.IsNullOrEmpty(_profile.WebSite))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_WEBSITE")%>
                                </td>
                                <td>
                                    <a target="_blank" href="<%=_profile.WebSite  %>"><span style="float: left;" class="forum-icon forum-icon-web">
                                    </span>
                                        <%=_profile.WebSite  %></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.MSN))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_MSN") %>
                                </td>
                                <td>
                                    <a target="_blank" href=""><span style="float: left;" class="forum-icon forum-icon-msn">
                                    </span>
                                        <%=_profile.MSN %></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.Yahoo))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_YAHOO")%>
                                </td>
                                <td>
                                    <a target="_blank" href="<%="http://edit.yahoo.com/config/send_webmesg?.target="+_profile.Yahoo+"&.src=pg" %>">
                                        <span class="forum-icon forum-icon-yahoo" style="float: left;"></span>
                                        <%=_profile.Yahoo %></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.Email))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_EMAIL")%>
                                </td>
                                <td>
                                    <a target="_blank" href="<%="javascript:portal.mail('" + _profile.Email + "');void(0);" %>">
                                        <span class="forum-icon forum-icon-email" style="float: left;"></span>
                                        <%=_profile.Email%></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.Blog))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_BLOG")%>
                                </td>
                                <td>
                                    <a target="_blank" href="<%=_profile.Blog  %>"><span style="float: left;" class="forum-icon forum-icon-blog">
                                    </span>
                                        <%=_profile.Blog  %></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.ICQ))
                               {%>
                            <tr>
                                <td style="white-space: nowrap; width: 80px;">
                                    <%=Html.Global("RES_ICQ")%>
                                </td>
                                <td>
                                    <a target="_blank" href="<%=_profile.ICQ  %>"><span style="float: left;" class="forum-icon forum-icon-icq">
                                    </span>
                                        <%=_profile.ICQ  %></a>
                                </td>
                            </tr>
                            <%} %>
                            <% if (!string.IsNullOrEmpty(_profile.Signature))
                               { %>
                            <tr>
                                <td>
                                    <%=Html.Global("RES_SIGNATURE")%>
                                </td>
                                <td>
                                    <%=Html.Encode(_profile.Signature) %>
                                </td>
                            </tr>
                            <%} %>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
